package ar.edu.unlu.sistemas.movirdroid.business.vo;

public class UpdateIndexVO {
	
	public static final String ACTION_REMOVE = "R";
	public static final String ACTION_INSERT = "I";
	
	private String docName;
	private String action;
	
	public String getDocName() {
		return docName;
	}
	public void setDocName(String docName) {
		this.docName = docName;
	}
	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}
	
	private UpdateIndexVO(String docName, String action) {
		this.setDocName(docName);
		this.setAction(action);
	}
	
	public static UpdateIndexVO insertDoc(String docName) {
		return new UpdateIndexVO(docName,ACTION_INSERT);
	}
	
	public static UpdateIndexVO removeDoc(String docName) {
		return new UpdateIndexVO(docName,ACTION_REMOVE);
	}
	
	public String toString() {
		return ACTION_INSERT.equals(this.getAction()) ? " Insertar "+this.getDocName():" Remover "+this.getDocName();
		
	}

}
